Hello, I'm wondering if anyone can help me find the cause of an error message I'm getting when I try to run a DXL script. The script attached is a (very very) simple representation of what I'm trying to do (can't post work-related script!) and returns the exact same errors resulting from the "real" script.
The intention of the script is to - open dialogue box - press button btnStep1 to call function fnTest1 and return the value of b (to be shown in field dbeInput) - press button btnStep2 to call function fnTest2 and close the dialog box. There is no output returned from fnTest2 in the "real" script, but it's a useful diagnostic in this simple test script to return the value of c.
The error message which occurs is as follows:
-E- DXL: <Line:27> incorrect arguments for function (button)
I've read and re-read the 'DXL Reference Manual' definitions for button() and ok(), but no "lightbulb" moments. I've a suspicion that the error might be related to DB vs DBE in the callback in the button arguments, but I haven't enough experience to identify the problem properly or know how to solve it! Any advice (or specific corrections to the portions of script related to the button/ok functions) would be greatly appreciated.
Cheers, Karl
kdunlop - Wed Oct 23 11:43:49 EDT 2013 |
Re: Incorrect arguments for function (button)/ function(ok) The "button" perm takes a function call, and that function MUST have exactly one parameter, a DBE and has no ..err.. void return value. That is what this manual snip means:
The "ok" perm takes a callback function with a single "DB" parameter
I'm pretty sure your real dialog will have some DBE values "a" and "b"; and your callback functions would read ..err.. "get" the value from those DBEs and THEN do the calculation. -Louie |
Re: Incorrect arguments for function (button)/ function(ok) llandale - Wed Oct 23 13:24:45 EDT 2013 The "button" perm takes a function call, and that function MUST have exactly one parameter, a DBE and has no ..err.. void return value. That is what this manual snip means:
The "ok" perm takes a callback function with a single "DB" parameter
I'm pretty sure your real dialog will have some DBE values "a" and "b"; and your callback functions would read ..err.. "get" the value from those DBEs and THEN do the calculation. -Louie That really helps, thank you! |